#include "gtkcssproviderprivate.h"
+#include "gtkbitmaskprivate.h"
#include "gtkcssparserprivate.h"
#include "gtkcsssectionprivate.h"
#include "gtkcssselectorprivate.h"
GtkCssSelector *selector;
GHashTable *widget_style;
GHashTable *style;
+ GtkBitmask *set_styles;
guint has_inherit :1;
};
g_hash_table_ref (new->widget_style);
if (new->style)
g_hash_table_ref (new->style);
+ if (new->set_styles)
+ new->set_styles = _gtk_bitmask_copy (new->set_styles);
}
static void
{
if (ruleset->style)
g_hash_table_unref (ruleset->style);
+ if (ruleset->set_styles)
+ _gtk_bitmask_free (ruleset->set_styles);
if (ruleset->widget_style)
g_hash_table_unref (ruleset->widget_style);
if (ruleset->selector)
PropertyValue *value)
{
if (ruleset->style == NULL)
- ruleset->style = g_hash_table_new_full (g_direct_hash,
- g_direct_equal,
- NULL,
- (GDestroyNotify) property_value_free);
+ {
+ ruleset->style = g_hash_table_new_full (g_direct_hash,
+ g_direct_equal,
+ NULL,
+ (GDestroyNotify) property_value_free);
+ ruleset->set_styles = _gtk_bitmask_new ();
+ }
if (_gtk_style_property_is_shorthand (prop))
{
return;
}
+ _gtk_bitmask_set (ruleset->set_styles, _gtk_style_property_get_id (prop), TRUE);
ruleset->has_inherit |= _gtk_style_property_is_inherit (prop);
g_hash_table_insert (ruleset->style, (gpointer) prop, value);
}